Back

PHONEME TABLES


A phoneme table defines all the phonemes which are used by a language, together with their properties and the data for their production as sounds.

Generally each language has its own phoneme table, although additional phoneme tables can be used for different voices within the language. These alternatives are referenced from Voices files.

A phoneme table does not need to define all the phonemes used by a language. Instead it can reference a previously defined phoneme table, whose phonemes it inherits. These can then be used as they are, or overridden by new definitions, or new phonemes added. For example, a phoneme table may redefine (or add) some of the vowels that it uses, but inherit most of its consonants from a standard set.

Note: This specification is not yet complete and does not include the definitions of the formant sequence specifications.
The source files for the phoneme data is in the "phsource" directory in the espeakedit download package.

 


Phoneme files

The phoneme tables are defined in a master phoneme file, named phonemes. This starts with the base phoneme table followed by other phoneme tables for languages and voices which inherit phonemes from the base table or from each other.

In addition to phoneme definitions, the phoneme file can contain the following:

include <filename>
Includes the text of the specified file at this point. This allows different phoneme tables to be kept in different text files, for convenience. <filename> is a relative path. The included file can itself contain include statements.

phonemetable <name> <parent>
Starts a new phoneme table, and ends the previous table.
<name> Is the name of this phoneme table. This name is used in Voices files.
<parent> Is the name of a previously defined phoneme table whose phoneme definitions are inherited by this one. The name base indicates the first (base) phoneme table.

phonemenumber <integer>
This statement is used at the start of the master phonemes file to define some specific code numbers for various phonemes which are used directly within the speak program.

 


Phoneme definitions

A phoneme table contains a list of phoneme definitions. Each starts with the keyword phoneme and the phoneme name (this is the name used in the pronunciation rules), and ends with the keyword endphoneme. For example:
  phoneme aI
    vowel
    length 230
    formants vowels/ai
    starttype (a) endtype (I)
  endphoneme

  phoneme s
    vls alv frc sibilant
    vowelin  f1=0  f2=1700 -300 300  f3=-100 100
    vowelout f1=0  f2=1700 -300 250  f3=-100 100  rms=20
    lengthmod 3
    wave unvoc/s
    before _ unvoc/s_
    before p unvoc/s!
    before t unvoc/s!
    before k unvoc/s!
    switchvoicing z
  endphoneme

Within the phoneme definition the following lines may occur: ( (V) indicates only for vowels, (C) only for consonants)

 


Phoneme Pairs

The pronunciation of a phoneme can depend on the phonemes before and after it. Some of this modification is done automatically - the program automatically adjusts the beginning and end of a vowel to match its adjacent sounds. You can also specify variant pronunciations in the phoneme table.

The before and after statements can specify different sound variants to be used when the phoneme is before or is after another specified phoneme. The adjacent phoneme that's specified in a before or after statement may refer not just to one, but to other phonemes too. For example:

   before ; unvoc/s;
means that the sound unvoc/s; is used (rather than unvoc/s if the following phoneme is [;]. But this rule also applies if the next phoneme is another type of pause, [_] or [;;]. This is because these two include a line
   starttype ;
in their phoneme specifications. This means that they look like a [;] to a preceding phoneme.

When looking for a matching before or after rule, if an exact match is not found, then a match is looked for by replacing either or both of the two phonemes by their starttype and endtype groups as appropriate.

virtual phonemes can be defined for use in starttype and endtype statements. For example, a virtual phoneme [ (i) ] is used to represent vowels which start with and end with an [i] type sound. So [i:] and [I] have starttype (i) and those, plus diphthongs such as [aI] [eI] [OI] have endtype (i) . By convension, names of virtual phonemes include a pair of round brackets.

 


Sound Specifications

There are three ways to produce sounds: A <sound spec> in the phoneme table can refer to a WAV file, a formant sequence, or a mixture of both. It can also include a numeric value to adjust the length of the sound.

 


Vowel Transitions

These specify how a consonant affects an adjacent vowel. A consonant may cause a transition in the vowel's formants as the mouth changes shape between the consonant and the vowel. The following attributes may be specified. Note that the maximum rate of change of formant frequencies is limited by the speak program.